home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Comms Spectacular / AppleTalk Remote Access / NetComm ARA Scripts V1.1 / NetComm SM V6 < prev    next >
Encoding:
Text File  |  1994-04-07  |  3.2 KB  |  207 lines  |  [mlts/slnk]

  1.  
  2. !"NetComm SmartModem V6 - V22bis 3rd December 1993 - NJS - v1.0
  3. !
  4. ! Modem is setup for constant speed interface, no mnp, and ignore DTR
  5. !
  6. ! Please note that you will need a macintosh Hardware Handshake cable to
  7. ! use any modem with AppleTalk Remote Access at anything over 9600bps.
  8. !
  9. @ORIGINATE
  10. @ANSWER
  11. !
  12. @LABEL 1
  13. serreset 19200, 0, 8, 1
  14. !
  15. ! first sync up the modem
  16. !
  17. matchclr
  18. matchstr 1 3 "A"
  19. settries 0
  20. @LABEL 2
  21. write "A"
  22. matchread 10
  23. inctries
  24. iftries 4 3
  25. jump 2
  26. @LABEL 3
  27. matchclr
  28. settries 0
  29. matchstr 1 4 "OK\13\10"
  30. write "T\13"
  31. matchread 30
  32. !
  33. !    Now, recall the modems factory configuration
  34. !
  35. @LABEL 4
  36. matchstr 1 5 "OK\13\10"
  37. write "AT&F\13"
  38. matchread 30
  39. inctries
  40. iftries 2 59
  41. ! Modem is not responding, reset
  42. DTRClear
  43. pause 5
  44. DTRSet
  45. jump 4
  46. !
  47. ! Next, Set up the configuration:
  48. ! Echo off, turn off auto answer
  49. ! Ignore DTR (needed when using a hardware handshake cable)
  50. !
  51. @LABEL 5
  52. matchstr 1 6 "OK\13\10"
  53. write "ATE0&D0S0=0\13"
  54. matchread 30
  55. jump 59
  56. !
  57. ! Connect in Constant speed mode, no mnp, Hardware flow control 
  58. ! with V22bis.
  59. !
  60. @LABEL 6
  61. matchstr 1 7 "OK\13\10"
  62. write "AT\\N0&D0&K3%C0X3B2\13"
  63. matchread 30
  64. jump 59
  65. !
  66. ! Set up the speaker: If speaker flag is "1", jump to 8;  else turn off speaker
  67. @LABEL 7
  68. ifstr 2 8 "1"
  69. matchstr 1 8 "OK\13\10"
  70. write "ATM0\13"
  71. matchread 30
  72. jump 59
  73. !
  74. ! The modem is ready.  So enable answering, or originate a call
  75. !
  76. @LABEL 8
  77. ifANSWER 30
  78. note "Dialing ^1" 3
  79. write "ATS0=0DT^1\13"
  80. !
  81. @LABEL 9
  82. matchstr 1 11 "CONNECT 1200\13\10"
  83. matchstr 2 12 "CONNECT 2400\13\10"
  84. matchstr 3 50 "NO CARRIER\13\10"
  85. matchstr 4 50 "ERROR\13\10"
  86. matchstr 5 52 "NO DIALTONE\13\10"
  87. matchstr 6 53 "BUSY\13\10"
  88. matchstr 7 54 "NO ANSWER\13\10"
  89. matchread 700
  90. jump 59
  91. !
  92. @LABEL 11
  93. note "Modem connection established at 1200 bps." 2
  94. CommunicatingAt 1200
  95. jump 20
  96. !
  97. @LABEL 12
  98. note "Modem connection established at 2400 bps." 2
  99. CommunicatingAt 2400
  100. jump 20
  101. !
  102. @LABEL 20
  103. HSReset 0 1 0 0 0 1
  104. ifANSWER 21
  105. pause 30
  106. @LABEL 21
  107. exit 0
  108. !
  109. !
  110. ! Set up the modem to answer
  111. @LABEL 30
  112. write "ATS0=2\13"
  113. matchstr 1 31 "OK\13\10"
  114. matchread 30
  115. jump 59
  116. !
  117. @LABEL 31
  118. matchstr 1  32 "RING\13\10"
  119. matchstr 2  11 "CONNECT 1200\13\10"
  120. matchstr 3  12 "CONNECT 2400\13\10"
  121. matchstr 4  50 "NO CARRIER\13\10"
  122. matchstr 5  50 "ERROR\13\10"
  123. matchstr 6  52 "NO DIALTONE\13\10"
  124. matchstr 7  53 "BUSY\13\10"
  125. matchstr 8 54 "NO ANSWER\13\10"
  126. matchread 700
  127. jump 31
  128. !
  129. @LABEL 32
  130. userhook 1
  131. note "Answering phone…" 2
  132. jump 31
  133. !
  134. ! 50: error messages
  135. !
  136. @LABEL 50
  137. exit -6021
  138. !
  139. @LABEL 52
  140. exit -6020
  141. !
  142. @LABEL 53
  143. exit -6022
  144. !
  145. @LABEL 54
  146. exit -6023
  147. !
  148. @LABEL 59
  149. exit -6019
  150. !
  151. ! Hang up the modem
  152. !
  153. @HANGUP
  154. @LABEL 60
  155. settries 0
  156. @LABEL 61
  157. matchclr
  158. matchstr 1 63 "OK\13\10"
  159. matchstr 2 63 "NO CARRIER\13\10"
  160. matchstr 3 63 "ERROR\13\10"
  161. write "ATH\13"
  162. matchread 30
  163. inctries
  164. iftries 3 63
  165. ! no response, try escape sequence
  166. matchclr
  167. matchstr 1 62 "OK\13\10"
  168. write "+++"
  169. matchread 20
  170. !
  171. ! No response from modem, toggle DTR
  172. !
  173. DTRClear
  174. pause 5
  175. DTRSet
  176. jump 61
  177. !
  178. @LABEL 62
  179. pause 5
  180. write "ATH0\13"
  181. matchstr 1 63 "OK\13\10"
  182. matchstr 2 63 "NO CARRIER\13\10"
  183. matchstr 3 63 "ERROR\13\10"
  184. matchread 70
  185. jump 61
  186. !
  187. ! Recall factory settings
  188. !
  189. @LABEL 63
  190. pause 5
  191. matchclr
  192. matchstr 1 64 "OK\13\10"
  193. write "AT&F\13"
  194. matchread 30
  195. !
  196. ! Turn off auto answer
  197. !
  198. @LABEL 64
  199. write "ATS0=0\13"
  200. matchstr 1 65 "OK\13\10"
  201. matchread 30
  202. !
  203. !
  204. @LABEL 65
  205. exit 0
  206.